home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / POV-Ray 3.0.2 / src / MacSource / aeTok.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-14  |  2.9 KB  |  76 lines  |  [TEXT/CWIE]

  1. /*==============================================================================
  2. Project:    POV
  3.  
  4. Version:    3
  5.  
  6. File:        aeTok.h
  7.  
  8. Description:
  9.     AppleEvent token-handling utils.
  10. ------------------------------------------------------------------------------
  11. Author:
  12.     Eduard [esp] Schwan
  13. ------------------------------------------------------------------------------
  14.     from Persistence of Vision(tm) Ray Tracer
  15.     Copyright 1996 Persistence of Vision Team
  16. ------------------------------------------------------------------------------
  17.     NOTICE: This source code file is provided so that users may experiment
  18.     with enhancements to POV-Ray and to port the software to platforms other 
  19.     than those supported by the POV-Ray Team.  There are strict rules under
  20.     which you are permitted to use this file.  The rules are in the file
  21.     named POVLEGAL.DOC which should be distributed with this file. If 
  22.     POVLEGAL.DOC is not available or for more info please contact the POV-Ray
  23.     Team Coordinator by leaving a message in CompuServe's Graphics Developer's
  24.     Forum.  The latest version of POV-Ray may be found there as well.
  25.  
  26.     This program is based on the popular DKB raytracer version 2.12.
  27.     DKBTrace was originally written by David K. Buck.
  28.     DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  29. ------------------------------------------------------------------------------
  30. Change History:
  31.     960120    [esp]
  32. ==============================================================================*/
  33.  
  34. #ifndef AETOK_H
  35. #define AETOK_H
  36.  
  37. //===========================================================================
  38. // Headers
  39. //===========================================================================
  40.  
  41. #include "config.h"
  42. #include <Types.h>
  43. #include <AppleEvents.h> // DescType
  44. #include "povmac.h"        // kAppSig
  45.  
  46.  
  47. //===========================================================================
  48. // Definitions
  49. //===========================================================================
  50.  
  51. // AEvt codes
  52. #define kThingSuite        kAppSignature
  53. #define    cAppPrefs        kAppSignature
  54.  
  55. // Our Token structure
  56.  
  57. // MyToken.flags values
  58. #define    eTokIsObject            0x01
  59. #define    eTokIsProperty            0x02
  60.  
  61. typedef struct {
  62.      DescType    fClass;        // flags=object: this is the object's class.
  63.                              // flags=property: this is the class of the object containing the property.
  64.      short        fFlags;        // A set of bit flags, defined above
  65.      DescType    fPropCode;    // the property, if flags says this is a property
  66.      long        fValue;        // object-specific value or id
  67. } MyToken_t, *MyTokenPtr_t, **MyTokenH_t;
  68.  
  69. // The following macros make it easier to get to the fields of the token AEDesc
  70. #define    GetTokDescClass(tokenDesc)         ((**(MyTokenH_t)((tokenDesc).dataHandle)).fClass)
  71. #define    GetTokDescFlags(tokenDesc)        ((**(MyTokenH_t)((tokenDesc).dataHandle)).fFlags)
  72. #define    GetTokDescPropCode(tokenDesc)    ((**(MyTokenH_t)((tokenDesc).dataHandle)).fPropCode)
  73. #define    GetTokDescValue(tokenDesc)         ((**(MyTokenH_t)((tokenDesc).dataHandle)).fValue)
  74.  
  75. #endif // AETOK_H
  76.